const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
    entry: {
        index: ['./src/scss/index.scss', './src/js/index.js'],
        huxing: ['./src/scss/huxing.scss', './src/js/huxing.js'],
        jituan: ['./src/scss/jituan.scss', './src/js/jituan.js'],
        liuyan: ['./src/scss/liuyan.scss', './src/js/liuyan.js'],
        xiangmu: ['./src/scss/xiangmu.scss', './src/js/xiangmu.js'],
        toupiao: ['./src/scss/toupiao.scss', './src/js/toupiao.js'],
        xinwen: ['./src/scss/xinwen.scss', './src/js/xinwen.js'],
        zhaoshang: ['./src/scss/zhaoshang.scss', './src/js/zhaoshang.js'],
        lianjie: ['./src/scss/lianjie.scss', './src/js/lianjie.js'],
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: "./src/html/index.html",
            filename: "index.html",
            chunks: ["index"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/huxing.html",
            filename: "huxing.html",
            chunks: ["huxing"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/jituan.html",
            filename: "jituan.html",
            chunks: ["jituan"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/liuyan.html",
            filename: "liuyan.html",
            chunks: ["liuyan"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/xiangmu.html",
            filename: "xiangmu.html",
            chunks: ["xiangmu"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/toupiao.html",
            filename: "toupiao.html",
            chunks: ["toupiao"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/xinwen.html",
            filename: "xinwen.html",
            chunks: ["xinwen"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/zhaoshang.html",
            filename: "zhaoshang.html",
            chunks: ["zhaoshang"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/lianjie.html",
            filename: "lianjie.html",
            chunks: ["lianjie"]
        }),
    ]
}